<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title></title>
<meta name="keywords" content="">
<meta name="description" content="">
<link rel="shortcut icon" href="favicon.ico">
<link href="/css/bootstrap.min.css?v=3.3.6" rel="stylesheet">
<link href="/css/font-awesome.css?v=4.4.0" rel="stylesheet">
<link href="/css/animate.css" rel="stylesheet">
<link href="/css/plugins/dropzone/basic.css" rel="stylesheet">
<link href="/css/plugins/dropzone/dropzone.css" rel="stylesheet">
<link href="/css/style.css?v=4.1.0" rel="stylesheet">
</head>
<body class="gray-bg">
	<div class="wrapper wrapper-content animated fadeIn">
		<div class="row">
			<div class="col-sm-12">
				<div class="ibox float-e-margins">
					<div class="ibox-content">
						<form enctype="multipart/form-data" method="post"
							action="/blog/attach/upload">
							图片<input type="file" name="file" /> <input type="submit"
								value="上传" />
						</form>
					</div>
				</div>
			</div>
		</div>
	</div>
	<!-- 全局js -->
	<script src="/js/jquery.min.js?v=2.1.4"></script>
	<script src="/js/bootstrap.min.js?v=3.3.6"></script>
	<!-- 自定义js -->
	<script src="/js/content.js?v=1.0.0"></script>
	<!-- DROPZONE -->
	<script src="/js/plugins/dropzone/dropzone.js"></script>

	<script type="text/javascript">
		$("#dropzone").dropzone({
			url : "/blog/attach/upload",
			filesizeBase : 1024,//定义字节算法 默认1000
			maxFiles : 10,//最大文件数量
			maxFilesize : 100, //MB
			fallback : function() {
				layer.alert('暂不支持您的浏览器上传!');
			},
			uploadMultiple : true,
			dictFileTooBig : '您的文件超过' + 100 + 'MB!',
			dictInvalidInputType : '不支持您上传的类型',
			dictMaxFilesExceeded : '您的文件超过10个!',
			init : function() {
				this.on('queuecomplete', function(files) {
					tale.alertOkAndReload('上传成功');
				});
				this.on('error', function(a, errorMessage, result) {
					if (!result.success && result.msg) {
						tale.alertError(result.msg || '上传失败');
					}
				});
				this.on('maxfilesreached', function() {
					this.removeAllFiles(true);
					tale.alertWarn('文件数量超出限制');
				});
			}
		});
	</script>
</body>
</html>
